package com.kai.steering.data.service.entity.po;

import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.annotation.IdType;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableId;

import java.io.Serializable;

import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.kai.steering.data.service.entity.domainObject.KnowledgeDO;
import lombok.*;

import java.io.Serializable;
import java.util.stream.Collectors;

/**
 * <pre>
 * 知识点
 * </pre>
 *
 * @author kai
 * @since 2022-02-23
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@ToString
@EqualsAndHashCode(callSuper = false)
@TableName(value = "knowledge")

public class Knowledge implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 知识点id
     */
    @TableId(value = "knowledge_id", type = IdType.ASSIGN_UUID)

    private String knowledgeId;


    /**
     * 知识点名
     */

    private String knowledgeName;


    /**
     * 知识点信息 
     */

    private String knowledgeIntroduce;


    /**
     * 创建时间
     */

    private Date creationDate;


    /**
     * 管理员id或者用户id
     */

    private String founder;


    /**
     * 上级知识点id
     */

    private String knowledgeSuperior;


    /**
     * 级别
     */

    private Integer level;


    /**
     * 存在0删除1
     */
    @TableLogic
    private Integer usable;


    /**
     * 删除日期
     */

    private Date deleteDate;


    public Knowledge(KnowledgeDO knowledgeDO) {
        BeanUtil.copyProperties(knowledgeDO,this);
    }
}
